with Element; use Element;
with Block; use Block;
with Ada.Containers.Vectors;
with IO; use IO;

package Parser_Filter is

   type Element_Filter_Interface is interface;
   procedure Found_Element(This : in out Element_Filter_Interface; E : in Element_Type) is abstract;
   type Element_Filter_Access is access all Element_Filter_Interface'Class;

   package Element_Vec is new Ada.Containers.Vectors
     (Element_Type => Element_Type, Index_type => Positive);

   -- ID filter, finds all Elements with the ID
   type ID_Filter_Type(In_ID : Element_ID_Type) is new Element_Filter_Interface with
      record
         ID : Element_ID_Type := In_ID;
         Result : Element_Vec.Vector;
      end record;
   overriding procedure Found_Element(This : in out ID_Filter_Type; E : in Element_Type);

   -- Print filter, prints most relevant elements
   type Print_Filter_Type is new Element_Filter_Interface with
      record
         null;
      end record;
   overriding procedure Found_Element(This : in out Print_Filter_Type; E : in Element_Type);

end Parser_Filter;